package cn.declare.utils;

import cn.declare.vo.ResultVO;

/**
 * author   岳静贤
 * 工具类    controller类返回ResultVo类型
 */
public class ResultVoUtils {

    public static ResultVO success(Object object){
        ResultVO resultVO = new ResultVO();
        //如果状态正确返回0
        resultVO.setCode(0);
        resultVO.setData(object);
        return resultVO;
    }

    public static ResultVO fild(){
        ResultVO resultVO = new ResultVO();
        //如果状态异常返回-1
        resultVO.setCode(-1);
        return resultVO;
    }
}
